package person.drf.shop.product.entity;

import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;
import java.util.Date;
import lombok.Data;
import org.hibernate.validator.constraints.URL;

import javax.validation.constraints.Min;
import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;

/**
 * Ʒ
 * 
 * @author dengrunfa
 * @email 1270733328@qq.com
 * @date 2020-04-07 15:45:24
 */
@Data
@TableName("pms_brand")
public class BrandEntity implements Serializable {
	private static final long serialVersionUID = 1L;

	/**
	 *
	 */
	@TableId
	private Long brandId;
	/**
	 *
	 */
	//校验规则：不能空  message：当检验出错，会提示信息
	@NotEmpty(message = "名字不能为空")
	private String name;
	/**
	 *
	 */
	@NotEmpty(message = "logo不能为空")
	@URL(message = "logo必须是一个合法url地址")
	private String logo;
	/**
	 *
	 */
	@NotNull(message = "排序不能为空")
	@Min(value = 0,message = "排序必须大于等于0")
	private Integer sort;
	/**
	 * 
	 */
	private String descript;
	/**
	 * 
	 */
	private Integer showStatus;
	/**
	 * 
	 */
	@Pattern(regexp="^[a-zA-Z]$",message = "检索首字母必须是一个字母")  //自定义Pattern规则  正则表达
	private String firstLetter;


}
